//
//  Journal.h
//  Projet A2014
//
//  Created by Jules Thuillier on 03/11/2014.
//  Copyright (c) 2014 Jules Thuillier Erwan Marchand. All rights reserved.
//

#ifndef __Projet_A2014__Journal__
#define __Projet_A2014__Journal__

#include <stdio.h>
#include <iostream>
#include <fstream>
#include <string>
#include <sstream>

class Journal
{
    
public:
    Journal();
    ~Journal();
    
    bool candidatADejaVote(std::string ip, unsigned int port);
    bool ajouterEntree(std::string ip, unsigned int port, unsigned int heure, unsigned int minute, unsigned int seconde);
	void FermerFluxEcriture();
    
protected:
    
private:
    std::ofstream fichierEcriture;
    std::ifstream fichierLecture;
    std::string filename;
    
    bool OuvrirFluxLecture();
    bool OuvrirFluxEcriture();
    void FermerFluxLecture();
	
    
};

#endif /* defined(__Projet_A2014__Journal__) */
